Optimal. Leaf size=59 \[ \frac {a (i A+B) c^4 (1-i \tan (e+f x))^4}{4 f}-\frac {a B c^4 (1-i \tan (e+f x))^5}{5 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.051, Rules used = {3669, 45}
\begin {gather*} \frac {a c^4 (B+i A) (1-i \tan (e+f x))^4}{4 f}-\frac {a B c^4 (1-i \tan (e+f x))^5}{5 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 3669
Rubi steps
\begin {align*} \int (a+i a \tan (e+f x)) (A+B \tan (e+f x)) (c-i c \tan (e+f x))^4 \, dx &=\frac {(a c) \text {Subst}\left (\int (A+B x) (c-i c x)^3 \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \text {Subst}\left (\int \left ((A-i B) (c-i c x)^3+\frac {i B (c-i c x)^4}{c}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {a (i A+B) c^4 (1-i \tan (e+f x))^4}{4 f}-\frac {a B c^4 (1-i \tan (e+f x))^5}{5 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(226\) vs. \(2(59)=118\).
time = 1.18, size = 226, normalized size = 3.83 \begin {gather*} \frac {a c^4 \sec (e) \sec ^5(e+f x) (5 (-5 i A+3 B) \cos (f x)+5 (-5 i A+3 B) \cos (2 e+f x)-10 i A \cos (2 e+3 f x)+10 B \cos (2 e+3 f x)-10 i A \cos (4 e+3 f x)+10 B \cos (4 e+3 f x)+25 A \sin (f x)+15 i B \sin (f x)-25 A \sin (2 e+f x)-15 i B \sin (2 e+f x)+15 A \sin (2 e+3 f x)+5 i B \sin (2 e+3 f x)-10 A \sin (4 e+3 f x)-10 i B \sin (4 e+3 f x)+5 A \sin (4 e+5 f x)+3 i B \sin (4 e+5 f x))}{40 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.10, size = 85, normalized size = 1.44
method | result | size |
risch | \(\frac {4 a \,c^{4} \left (5 i A \,{\mathrm e}^{2 i \left (f x +e \right )}+5 B \,{\mathrm e}^{2 i \left (f x +e \right )}+5 i A -3 B \right )}{5 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{5}}\) | \(56\) |
derivativedivides | \(\frac {i a \,c^{4} \left (\frac {B \left (\tan ^{5}\left (f x +e \right )\right )}{5}+\frac {\left (3 i B +A \right ) \left (\tan ^{4}\left (f x +e \right )\right )}{4}+\frac {\left (3 i A -3 B \right ) \left (\tan ^{3}\left (f x +e \right )\right )}{3}+\frac {\left (-i B -3 A \right ) \left (\tan ^{2}\left (f x +e \right )\right )}{2}-i A \tan \left (f x +e \right )\right )}{f}\) | \(85\) |
default | \(\frac {i a \,c^{4} \left (\frac {B \left (\tan ^{5}\left (f x +e \right )\right )}{5}+\frac {\left (3 i B +A \right ) \left (\tan ^{4}\left (f x +e \right )\right )}{4}+\frac {\left (3 i A -3 B \right ) \left (\tan ^{3}\left (f x +e \right )\right )}{3}+\frac {\left (-i B -3 A \right ) \left (\tan ^{2}\left (f x +e \right )\right )}{2}-i A \tan \left (f x +e \right )\right )}{f}\) | \(85\) |
norman | \(\frac {A a \,c^{4} \tan \left (f x +e \right )}{f}-\frac {\left (-i A a \,c^{4}+3 B a \,c^{4}\right ) \left (\tan ^{4}\left (f x +e \right )\right )}{4 f}+\frac {\left (-3 i A a \,c^{4}+B a \,c^{4}\right ) \left (\tan ^{2}\left (f x +e \right )\right )}{2 f}-\frac {\left (i B a \,c^{4}+A a \,c^{4}\right ) \left (\tan ^{3}\left (f x +e \right )\right )}{f}+\frac {i B a \,c^{4} \left (\tan ^{5}\left (f x +e \right )\right )}{5 f}\) | \(121\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 100, normalized size = 1.69 \begin {gather*} -\frac {-4 i \, B a c^{4} \tan \left (f x + e\right )^{5} + 5 \, {\left (-i \, A + 3 \, B\right )} a c^{4} \tan \left (f x + e\right )^{4} + 20 \, {\left (A + i \, B\right )} a c^{4} \tan \left (f x + e\right )^{3} + 10 \, {\left (3 i \, A - B\right )} a c^{4} \tan \left (f x + e\right )^{2} - 20 \, A a c^{4} \tan \left (f x + e\right )}{20 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 106 vs. \(2 (51) = 102\).
time = 1.71, size = 106, normalized size = 1.80 \begin {gather*} -\frac {4 \, {\left (5 \, {\left (-i \, A - B\right )} a c^{4} e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (-5 i \, A + 3 \, B\right )} a c^{4}\right )}}{5 \, {\left (f e^{\left (10 i \, f x + 10 i \, e\right )} + 5 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 10 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 10 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 5 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 155 vs. \(2 (46) = 92\).
time = 0.36, size = 155, normalized size = 2.63 \begin {gather*} \frac {20 i A a c^{4} - 12 B a c^{4} + \left (20 i A a c^{4} e^{2 i e} + 20 B a c^{4} e^{2 i e}\right ) e^{2 i f x}}{5 f e^{10 i e} e^{10 i f x} + 25 f e^{8 i e} e^{8 i f x} + 50 f e^{6 i e} e^{6 i f x} + 50 f e^{4 i e} e^{4 i f x} + 25 f e^{2 i e} e^{2 i f x} + 5 f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 119 vs. \(2 (51) = 102\).
time = 0.93, size = 119, normalized size = 2.02 \begin {gather*} -\frac {4 \, {\left (-5 i \, A a c^{4} e^{\left (2 i \, f x + 2 i \, e\right )} - 5 \, B a c^{4} e^{\left (2 i \, f x + 2 i \, e\right )} - 5 i \, A a c^{4} + 3 \, B a c^{4}\right )}}{5 \, {\left (f e^{\left (10 i \, f x + 10 i \, e\right )} + 5 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 10 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 10 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 5 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.50, size = 100, normalized size = 1.69 \begin {gather*} \frac {\frac {1{}\mathrm {i}\,B\,a\,c^4\,{\mathrm {tan}\left (e+f\,x\right )}^5}{5}+\frac {1{}\mathrm {i}\,a\,\left (A+B\,3{}\mathrm {i}\right )\,c^4\,{\mathrm {tan}\left (e+f\,x\right )}^4}{4}+1{}\mathrm {i}\,a\,\left (-B+A\,1{}\mathrm {i}\right )\,c^4\,{\mathrm {tan}\left (e+f\,x\right )}^3-\frac {1{}\mathrm {i}\,a\,\left (3\,A+B\,1{}\mathrm {i}\right )\,c^4\,{\mathrm {tan}\left (e+f\,x\right )}^2}{2}+A\,a\,c^4\,\mathrm {tan}\left (e+f\,x\right )}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________